package com.my.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.my.bean.Category;
import com.my.bean.Page;
import com.my.bean.URLSAVE;
import com.my.bean.User;
import com.my.mapper.CategoryMapper;
import com.my.service.CategoryService;

@Service
public class CategoryServiceImpl  implements CategoryService{
	@Autowired
	CategoryMapper categoryMapper;
	public Category get(int id){
		return categoryMapper.get(id);
	}
	public void delete(int id){
		categoryMapper.delete(id);
	}
	public int add(Category category){
		return categoryMapper.add(category);
	}
	public List<Category> list(){
		return categoryMapper.list();
	};
	public int getcount(){
		return categoryMapper.count();
	}
	public int update(Category category) {
		// TODO Auto-generated method stub
		return categoryMapper.update(category);
	}
	@Override
	public List<Category> list(Page page) {
		// TODO Auto-generated method stub
		return categoryMapper.list(page);
	}
	@Override
	public List<User> selectall() {
		return categoryMapper.selectall();
	}
	@Override
	public int adduser(User user) {
		
		return categoryMapper.adduser(user);
	}
	@Override
	public void deleteuser(int id) {
		categoryMapper.deleteuser(id);
	}
	@Override
	public User selectbyname(String name) {
		return categoryMapper.selectbyname(name);
	}
	@Override
	public int addURL(URLSAVE urlsave) {
		return categoryMapper.addURL(urlsave);
	}
	@Override
	public URLSAVE selectbycontext(String url_context) {
		return categoryMapper.selectbycontext(url_context);
	}
	@Override
	public List<URLSAVE> selectallcontext() {
		return categoryMapper.selectallcontext();
	}
	@Override
	public List<URLSAVE> selectallsearch(String url_name) {
		return categoryMapper.selectallsearch(url_name);
	}


}
